<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
</head>
<body>
  
<div id="app">

<input type="text" v-focus>

</div>
  
<script>
    const focus = {
        mounted(el) {
            setTimeout(() => {
                el.focus();
            }, 1000);
        }
    }
const app = Vue.createApp({
    directives:{
        Focus: focus
    },
    data(){
        return{
            name: 'Mio'
        }
    }


});



app.mount('#app');


</script>
</body>
</html>